<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m180330_083620_ADD_FIELD_ROOM_USE
 */
class m180330_083620_ADD_FIELD_ROOM_USE extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{room_code}}', 'bed', Schema::TYPE_STRING. "(256) NULL COMMENT '详细床型' ");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m180330_083620_ADD_FIELD_ROOM_USE cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180330_083620_ADD_FIELD_ROOM_USE cannot be reverted.\n";

        return false;
    }
    */
}
